package com.yiren.backstage.communication.api.impl;

import android.content.Context;

import com.yiren.backstage.communication.api.AbstractCommunication;
import com.yiren.backstage.communication.interfaces.DataCallback;
import com.yiren.backstage.communication.services.impl.BluetoothPortServiceImpl;
import com.yiren.backstage.currency.constant.DeviceConnectTypeConstant;

/**
 * Time:2021/12/23 14:45
 * Author:xiaozan
 * Description:蓝牙通讯api 实现
 */
public class BluetoothCommunicationApiImpl extends AbstractCommunication {

    private static BluetoothCommunicationApiImpl bluetoothCommunicationApi;

    public static BluetoothCommunicationApiImpl getInstance(Context context) {
        if (null == bluetoothCommunicationApi) {
            bluetoothCommunicationApi = new BluetoothCommunicationApiImpl(context);
        }
        return bluetoothCommunicationApi;
    }

    public BluetoothCommunicationApiImpl(Context context) {
        super(context, DeviceConnectTypeConstant.TYPE_BLUETOOTH);
        abstractPortService = new BluetoothPortServiceImpl();
    }

   public void setParam(String key, Object obj){
       abstractPortService.setParam(key,obj);
   }


}
